set scheme s1color

use repeated_cross_section_placebo, clear

// muslim indicator 
gen muslim=(paiperc=="06"|paiperc=="08")


local sample if pnai28=="10"  & female==1 & birthyear>=1970
local var secondary
collapse (mean) `var' `sample', by(birthyear muslim)

twoway line `var'  birthyear if muslim==1, lcolor(red) legend(label(1 "Muslim") label(2 "Non-Muslim")) ///
 ||  line `var'  birthyear if muslim==0, lcolor(blue) xline(1976, lcolor(gs10)) ///
 xtitle("Year of birth") ytitle("Completed secondary education")
